As shown in Prior Art FIG. 1, a digital camera system 100 typically includes a digital camera 102 having a sensor 104 aligned with a lens 105, where the sensor 104 is capable of generating video signals including a plurality of discrete images. A display 106 can be coupled to the digital camera 102 by a digital processing system 108. One function of a digital processing system 108 may be to decompress compressed video images for the purpose of efficient storage and communication.
Prior Art FIG. 2 shows an initial stage of compression of the video signals received from the exemplary digital camera 102. As shown, one of the images 200 is received from the sensor 104 of the digital camera 102 and is subsequently divided into a plurality of blocks 202, or portions, each having dimensions of 16×16 pixels. Thereafter, each of the blocks 202 are separated into three color components including blue, green and red color components 204a-c, respectively.
With continuing reference to Prior Art FIG. 2, the blue, green and red color components 204a-c of each block 202 are transformed into chrominance (Cb, Cr) and illuminance (Y) components 206a-c, respectively. This is accomplished by a matrix algorithm as will be appreciated by those skilled in the art. Next, the chrominance components 206a, 206b are compressed to the extent of the having dimensions of 8×8 pixels, i.e. half the dimensions of the illuminance component 206c. The illuminance component 206c is exempted from compression due to the sensitivity of the human eye to such color component.
Prior Art FIG. 3 is a subsequent step of processing wherein the illuminance component 206c is subdivided into four components each having dimensions of 8×8 pixels. Altogether, a total of six parts are existent at this point in the processing for each component. The chrominance and illuminance components 206a-c are then processed by a discrete cosine transform (DCT) operation 300. The DCT operation 300 translates the pixel data of the chrominance and illuminance components 206a-c into corresponding spatial frequency data 302. This results in a 8×8 grid of spatial frequency numbers. As is conventional, low frequency data is positioned at an upper left hand portion of the 8×8 grid, high frequency data is positioned at a lower right hand portion of the 8×8 grid, horizontal frequency data is positioned at an upper right hand portion of the 8×8 grid, and vertical frequency data is positioned at a lower left hand portion of the 8×8 grid.
As shown in Prior Art FIG. 4, the spatial frequency data 302 is subsequently processed by a quantization operation 400, thus rendering scaled spatial frequency data 402, or quantized coefficients. This quantization operation 400 scales each of the spatial frequency data 302 of the 8×8 grid by a quantization factor in terms of importance when viewed by the human eye. For example, low frequency data is scaled differently than high frequency data since human vision is more sensitive to low frequency light.
With reference now to Prior Art FIG. 5, the scaled spatial frequency data 402 is then processed by a run length coding scheme 502. As shown, the numbers of the scaled spatial frequency data 402 are selected in a “zigzag” fashion, serialized, and subsequently encoded. When encoded, groups of zeros 504 are detected in the serialized scaled spatial frequency data 402 and are subsequently compressed. It should be noted that the high frequency data have a greater tendency to be subjected to such zero compression. This is because during the quantization operation, the high frequency data are quantized more, thereby resulting in lower numbers approaching zero.
Prior Art FIG. 6 shows a portion of the serialized bit stream of Prior Art FIG. 5 after the encoding operation 502 is carried out. As shown, the groups of zeros 504 are compressed and accompanied by a number 602 that is representative of the number of zeros. Together, the groups of zeros 504 and the number 602 form a “Huffman Group” 604. As will soon become apparent, the number 602 of the Huffman Group 604 becomes a coefficient in the resultant bit stream.
Such resultant bit stream is shown in Prior Art FIG. 7. As shown, the coefficients 700 are each accompanied by a command 702. This command 702 represents the number of preceding zeros in addition to the number of bits required to encode the number that follows. The length of each command 702 may be optimized by generating short commands 702 to cover common combinations of data and generating long commands 702 to cover unlikely combinations of data. The command thus has a variable-length.
With the image information now compressed, it is thus suitable for effective delivery to a desired location. Upon delivery, the image information must be decompressed. One decompression process of the prior art is shown in Prior Art FIG. 8. Upon starting in operation 800, 11 bits of raw data are obtained from the compressed bit stream in operation 802. Such 11 bits of raw data are then used to perform a look-up in a look-up table 805 in operation 804. An example of such look-up table 805 is shown in FIG. 8a. As shown, the look-up table includes a plurality of 2-byte data segments 807 each of which decodes different 11 bit segments of the raw data. For example, a 2-byte data segment may identify a command, a number of preceding zeros, and a coefficient following the command.
In operation 804, the 2-byte data segment that corresponds to the 11 bits obtained in operation 802 are retrieved. The information from the 2-byte data segment is then used to emit the number of zeros determined. Note operation 806. Next, the command may be consumed, or deleted, in operation 808. The coefficient specified by the 2-byte data segment is then decoded and emitted in operations 810 and 812, respectively. Thereafter, the bits of raw data that represent the coefficient are consumed in operation 814. Finally, it is determined in decision 816 whether any more bits of raw data remain. If so, the process of Prior Art FIG. 8 is repeated. If not, however, the process is terminated in operation 818.
It should be noted that the foregoing decompression scheme of Prior Art FIG. 8 includes a two-step method of processing both a DC code and a plurality of AC codes. As is well known by those of ordinary skill in the art, the DC code relates to an initial set of the bits representative of an image block while the AC codes relate to a plurality of subsequent set of the bits representing the image block.
The foregoing decoding process of Prior Art FIG. 8 thus depends on a unique data segment stored in a look-up table for every combination of bits of raw data obtained. This procedure can be very time consuming and thus result in a slow decoding time and lack of efficiency.
There is thus a need for decompressing a bit stream of compressed data representing a plurality of image blocks in a more expedited manner.